<template>
	<view>
		<navBar title="学习手册详情"></navBar>
		
		<view class="title">
			<text>{{sectionsDetail.title}}</text>
		</view>
		
		<view class="text">
			<u-parse :html="sectionsDetail.html_text"></u-parse>
		</view>
	</view>
</template>

<script>
	import {getStudySectionsDetail} from '../../utils/study.js'
	
	export default {
		data() {
			return {
				sections_id:'',
				sectionsDetail:{}
			};
		},
		methods:{
			//获取节详情内容
			async getStudySection(){
				let result = await getStudySectionsDetail(this.sections_id)
				if(result.code === 200){
					this.sectionsDetail = result.data[0]
				}
			}
		},
		onLoad(option) {
			this.sections_id = option.id
			this.getStudySection()
		}
	}
</script>

<style lang="scss" scoped>
.title{
	padding: 50rpx 0;
	display: flex;
	justify-content: center;
	font-size: 40rpx;
	font-weight: bold;
}

.text{
	width: 90%;
	margin: 0 auto;
}
</style>
